define([
    'angular',
    'angularAMD'
], function (angular, angularAMD) {
    var registerRoutes = function ($stateProvider, $urlRouterProvider) {
        $urlRouterProvider.otherwise('/index');

        /*$stateProvider.state('index', {
            url:'/index',
            views:{
                '':angularAMD.route({
                    templateUrl: 'components/main.html',
                    controllerUrl: 'components/mainController.js',
                    controller: 'mainController'
                }),
                //这里必须要绝对定位
                'header@index':{template:"<div>头部内容header</div>"},  //表示名为header的view属于index模板
                'nav@index':{template:"<div>菜单内容nav</div>"},
                'body@index':{template:"<div>展示内容contents</div>"},
                'footer@index':{template:"<div>底部footer</div>"}
            }
        })*/
        $stateProvider.state('index', {
            url:'/index',
            views:{
                '':angularAMD.route({
                    templateUrl: 'components/main.html',
                    controllerUrl: 'components/mainController.js',
                    controller: 'mainController',
                    controllerAs: 'mainCtr'
                }),
                //这里必须要绝对定位
                'header@index':{template:"<div>头部内容header</div>"},  //表示名为header的view属于index模板
                'nav@index':{template:"<div>菜单内容nav</div>"},
                'body@index':{template:"<div>展示内容contents</div>"},
                'footer@index':{template:"<div>底部footer</div>"}
            }
        })
    }
    return registerRoutes;
})